package task07;

import java.util.Scanner;

public class Test3 {
    public static void main(String[] args) {
        System.out.println("请输入一个数：");
        Scanner scanner=new Scanner(System.in);
        int x=scanner.nextInt();
        int y;

        if(x>=3){
            y=2*x+1;
        }else if(x>=-1){
            y=2*x;
        }else{
            y=2*x-1;
        }
        System.out.println("x="+x+",y="+y);
    }
}
